Skip to content

Conversation

edgurgel
Copy link
Member

@edgurgel edgurgel commented Oct 7, 2025

Changes:

  • Set max_heap_size the same as the websocket transport
  • Set fullsweep_after the same as the websocket transport

From Erlang docs:

A few cases when it can be useful to change fullsweep_after:

  • If binaries that are no longer used are to be thrown away as soon as possible. (Set Number to zero.)

  • A process that mostly have short-lived data is fullsweeped seldom or never, that is, the old heap contains mostly garbage. To ensure a fullsweep occasionally, set Number to a suitable value, such as 10 or 20.

  • In embedded systems with a limited amount of RAM and no virtual memory, you might want to preserve memory by setting Number to zero. (The value can be set globally, see erlang:system_flag/2.)

RealtimeChannel and the websocket transport match the second bullet point as the data is usually sent and received but not kept around.

@edgurgel edgurgel closed this Oct 7, 2025
@coveralls
Copy link

coveralls commented Oct 7, 2025

Coverage Status

coverage: 85.924% (+0.02%) from 85.908%
when pulling c5375b7 on fix/max-heap-size-part-2
into b8dd5f3 on main.

@edgurgel edgurgel reopened this Oct 7, 2025
@edgurgel edgurgel force-pushed the fix/max-heap-size-part-2 branch from 2e97cc2 to 339c20d Compare October 8, 2025 08:39
@edgurgel edgurgel requested a review from filipecabaco October 14, 2025 06:04
@edgurgel edgurgel force-pushed the fix/max-heap-size-part-2 branch 2 times, most recently from 83d0075 to 204b2a9 Compare October 14, 2025 21:33
@edgurgel edgurgel force-pushed the fix/max-heap-size-part-2 branch from 204b2a9 to c5375b7 Compare October 14, 2025 22:38
@edgurgel edgurgel merged commit c11f0a4 into main Oct 14, 2025
5 of 6 checks passed
@edgurgel edgurgel deleted the fix/max-heap-size-part-2 branch October 14, 2025 23:25
@kiwicopple
Copy link
Member

🎉 This PR is included in version 2.54.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants